﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Media;

namespace WQDSkin.Forms.Controls
{
    public class SystemCloseButton : WQDSystemButton
    {
        Window targetWindow;
        public SystemCloseButton()
        { 
            Click += delegate {
                if (targetWindow == null)
                {
                    targetWindow = Window.GetWindow(this);
                }
                targetWindow.Close();
            };
        }
    }
}
